package com.sc.nft.dao;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sc.nft.entity.ShareTheIncomeRecord;
import com.sc.nft.mapper.ShareTheIncomeRecordMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 分润收入记录(ShareTheIncomeRecord)表Dao层
 *
 * @author wwc
 * @since 2023-04-21 13:46:29
 */
@Slf4j
@Repository
public class ShareTheIncomeRecordDao extends ServiceImpl<ShareTheIncomeRecordMapper, ShareTheIncomeRecord> {

    /**
     * 查询所有状态未发放的数据
     *
     * @return
     */
    public List<ShareTheIncomeRecord> exampleQueryAllUnprovisionedData(Integer type) {
        QueryWrapper<ShareTheIncomeRecord> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("status", 0);
        queryWrapper.eq("type", type);
        return this.list(queryWrapper);
    }

}
